<template>
  <div class="app-container">
    <!-- 搜索 -->
    <el-card class="search-card">
      <el-form
        :model="queryParams"
        ref="queryForm"
        size="small"
        :inline="true"
        v-show="showSearch"
        label-width="68px"
      >
        <el-row>
          <el-form-item label="校区" prop="classId">
            <el-select
              v-model="queryParams.classId"
              placeholder="请选择校区"
              @keyup.enter.native="handleQuery"
              style="width: 100%"
            >
              <el-option
                v-for="(item, index) in campusList"
                :key="index"
                :value="item.id"
                :label="item.className"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="年级" prop="gradeId">
            <el-select
              v-model="queryParams.classId"
              placeholder="请选择校区"
              @keyup.enter.native="handleQuery"
              style="width: 100%"
            >
              <el-option
                v-for="(item, index) in campusList"
                :key="index"
                :value="item.id"
                :label="item.className"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="班级" prop="gradeId">
            <el-select
              v-model="queryParams.status"
              placeholder="请选择使用状态"
              @keyup.enter.native="handleQuery"
              style="width: 100%"
            >
              <el-option value="1" label="开启"></el-option>
              <el-option value="2" label="关闭"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="姓名" prop="gradeId">
            <el-input placeholder="请输入姓名" v-model="queryParams.status"></el-input>
          </el-form-item>
          <el-form-item label="身份证号" prop="gradeId">
            <el-input
              placeholder="请输入身份证号"
              v-model="queryParams.status"
            ></el-input>
          </el-form-item>
          <el-form-item label="团餐计划" prop="gradeId">
            <el-select
              v-model="queryParams.status"
              placeholder="请选择团餐计划"
              @keyup.enter.native="handleQuery"
              style="width: 100%"
            >
              <el-option value="1" label="开启"></el-option>
              <el-option value="2" label="关闭"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="餐别类型" prop="gradeId">
            <el-select
              v-model="queryParams.status"
              placeholder="请选择餐别类型"
              @keyup.enter.native="handleQuery"
              style="width: 100%"
            >
              <el-option value="1" label="开启"></el-option>
              <el-option value="2" label="关闭"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="餐标类型" prop="gradeId">
            <el-select
              v-model="queryParams.status"
              placeholder="请选择餐标类型"
              @keyup.enter.native="handleQuery"
              style="width: 100%"
            >
              <el-option value="1" label="开启"></el-option>
              <el-option value="2" label="关闭"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="支付状态" prop="gradeId">
            <el-select
              v-model="queryParams.status"
              placeholder="请选择支付状态"
              @keyup.enter.native="handleQuery"
              style="width: 100%"
            >
              <el-option value="1" label="开启"></el-option>
              <el-option value="2" label="关闭"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="缴费方式" prop="gradeId">
            <el-select
              v-model="queryParams.status"
              placeholder="请选择缴费方式"
              @keyup.enter.native="handleQuery"
              style="width: 100%"
            >
              <el-option value="1" label="开启"></el-option>
              <el-option value="2" label="关闭"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="供餐日期" prop="gradeId">
            <el-date-picker
              v-model="queryParams.value1"
              type="date"
              placeholder="请选择团餐计划"
            >
            </el-date-picker>
          </el-form-item>
          <el-form-item>
            <el-button
              type="primary"
              icon="el-icon-search"
              size="mini"
              @click="handleQuery"
            >
              搜索
            </el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">
              重置
            </el-button>
          </el-form-item>
        </el-row>
      </el-form>
    </el-card>
    <el-card class="search-card">
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <el-button
            type="warning"
            plain
            icon="el-icon-download"
            size="mini"
            @click="handleExport"
            v-hasPermi="['campus:unpaid:export']"
          >
            导出
          </el-button>
        </el-col>
        <right-toolbar
          :showSearch.sync="showSearch"
          @queryTable="getList"
        ></right-toolbar>
      </el-row>
    </el-card>
    <el-card class="table-card">
      <el-table :data="dataList">
        <el-table-column label="校区" align="center" prop="name" />
        <el-table-column label="团餐计划" align="center" prop="idCardNumber" />
        <el-table-column label="供餐日期" align="center" prop="idCardNumber" />
        <el-table-column label="班级" align="center" prop="idCardNumber" />
        <el-table-column label="学生姓名" align="center" prop="idCardNumber" />
        <el-table-column label="学生身份证号" align="center" prop="idCardNumber" />
        <el-table-column label="餐标价格" align="center" prop="idCardNumber" />
        <el-table-column label="应付金额" align="center" prop="idCardNumber" />
        <el-table-column label="实缴金额" align="center" prop="idCardNumber" />
        <el-table-column label="是否折扣" align="center" prop="idCardNumber" />
        <el-table-column label="折扣" align="center" prop="idCardNumber" />
        <el-table-column label="餐标类型" align="center" prop="idCardNumber" />
        <el-table-column label="餐标缴费方式" align="center" prop="idCardNumber" />
        <el-table-column label="支付状态" align="center" prop="idCardNumber" />
        <el-table-column label="账单状态" align="center" prop="idCardNumber" />
        <el-table-column label="用户留言" align="center" prop="idCardNumber" />
      </el-table>
      <pagination
        v-show="total > 0"
        :total="total"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
    </el-card>
  </div>
</template>
<script>
import { listGrade } from "@/api/campus/grade";
import { listClassManage } from "@/api/campus/classManage";

export default {
  name: "Person",
  data() {
    return {
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 1,
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
      },
      dataList: [
        {
          status: 1,
          name: "1",
        },
        {
          name: "2",
          status: 2,
        },
      ],
      campusList: [],
      gradeList: [],
      queryForm: {},
    };
  },
  created() {},
  activated() {},
  methods: {
    // 列表
    getList() {},
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 导出
    handleExport() {
      this.download(
        "",
        {
          ...this.queryParams,
        },
        `餐别管理导出.xlsx`
      );
    },
  },
};
</script>
<style>
.padding_4_10 {
  padding: 4px 10px !important;
}
</style>
